import 'dart:convert';
import 'package:convert/convert.dart';
import 'package:crypto/crypto.dart';

void main() {
  var key = "D7A4EFC0FC7A6508171995EA67A41089";
  var mac = "term_version=BZ4.6_BCM&mchnt_cd=0002230F0561752&reserved_fy_term_id=00000012&masterKeySsn=00000303Q4NL00000012";
  print("MD5   :  "+generateMd5("name=kxyu&pass=12341234ABCDEF"));
  var _newDate = DateTime.now();
  print("time  : "+_newDate.toString());
}
String generateMd5(String data) {
  var content = new Utf8Encoder().convert(data);
  var digest = md5.convert(content);
  // 这里其实就是 digest.toString()
  return hex.encode(digest.bytes);
}